﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PedestrianSensingRadar
{
    public class PedestrainArea : CheckArea
    {
        private Pen drawPen = new Pen(Color.Green, 2);
        public PedestrainArea(Rectangle r) : base(r)
        {
         
        }

        //public void Draw(Graphics gra)
        //{
        //    gra.DrawRectangle(drawPen, rect);

        //    foreach (PosSizableRect pos in Enum.GetValues(typeof(PosSizableRect)))
        //    {
        //        gra.DrawRectangle(drawPen, GetRect(pos));
        //    }
        //}//画矩形的方法

        public override void Draw(Graphics gra)
        {
            gra.DrawRectangle(drawPen, rect);

            foreach (PosSizableRect pos in Enum.GetValues(typeof(PosSizableRect)))
            {
                gra.DrawRectangle(drawPen, GetRect(pos));
            }
        }
    }
}
